#!/user/bin/env python3
# -*- coding: utf-8 -*-
#-- anth bluedolphi ---

def right_replace(string, old, new, max=1):
    return string[::-1].replace(old[::-1], new[::-1], max)[::-1]
